VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "itgcontrols.ocx"
Begin VB.Form frmMaintChecksOnHand 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   8295
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   7590
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   8295
   ScaleWidth      =   7590
   ShowInTaskbar   =   0   'False
   Begin ITGControls.ITGTab SSTab1 
      Height          =   6855
      Left            =   0
      TabIndex        =   28
      Top             =   1035
      Width           =   7470
      _ExtentX        =   13176
      _ExtentY        =   12091
      TabCount        =   2
      TabCaption(0)   =   "               Main               "
      TabContCtrlCnt(0)=   5
      Tab(0)ContCtrlCap(1)=   "txtCheckNo"
      Tab(0)ContCtrlCap(2)=   "Timer1"
      Tab(0)ContCtrlCap(3)=   "cmdInvoices"
      Tab(0)ContCtrlCap(4)=   "lvwList"
      Tab(0)ContCtrlCap(5)=   "ComunionFrames2"
      TabCaption(1)   =   "               List               "
      TabContCtrlCnt(1)=   1
      Tab(1)ContCtrlCap(1)=   "dtgList"
      TabTheme        =   2
      ActiveTabBackStartColor=   16250865
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483630
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   6540
         Left            =   -75000
         TabIndex        =   24
         Top             =   315
         Width           =   7470
         _ExtentX        =   13176
         _ExtentY        =   11536
         _Version        =   393216
         AllowUpdate     =   0   'False
         AllowArrows     =   -1  'True
         Appearance      =   0
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   4
         BeginProperty Column00 
            DataField       =   "cCheckNo"
            Caption         =   "Check Number"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "cBankID"
            Caption         =   "Bank ID"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cCode"
            Caption         =   "Customer ID"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "nAmount"
            Caption         =   "Check Amount"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "#,##0.00"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   1
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            AllowRowSizing  =   0   'False
            BeginProperty Column00 
               ColumnAllowSizing=   -1  'True
               Locked          =   -1  'True
               ColumnWidth     =   1964.976
            EndProperty
            BeginProperty Column01 
               Locked          =   -1  'True
               ColumnWidth     =   1425.26
            EndProperty
            BeginProperty Column02 
               Locked          =   -1  'True
               ColumnWidth     =   1365.165
            EndProperty
            BeginProperty Column03 
               Alignment       =   1
               Locked          =   -1  'True
               ColumnWidth     =   1844.787
            EndProperty
         EndProperty
      End
      Begin ITGControls.ITGTextBox txtCheckNo 
         Height          =   285
         Left            =   270
         TabIndex        =   0
         Top             =   420
         Width           =   3345
         _ExtentX        =   5689
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Mandatory       =   -1  'True
         Label           =   "Check Number"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1280
         TextBoxWidth    =   2005
      End
      Begin VB.Timer Timer1 
         Interval        =   300
         Left            =   3630
         Top             =   420
      End
      Begin ITGControls.ITGCommandButton cmdInvoices 
         Height          =   315
         Left            =   5370
         TabIndex        =   1
         Top             =   420
         Width           =   1515
         _ExtentX        =   2672
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "Transactions >>"
      End
      Begin MSComctlLib.ListView lvwList 
         Height          =   255
         Left            =   1530
         TabIndex        =   25
         Top             =   960
         Visible         =   0   'False
         Width           =   5340
         _ExtentX        =   9419
         _ExtentY        =   450
         View            =   3
         LabelEdit       =   1
         LabelWrap       =   0   'False
         HideSelection   =   -1  'True
         FullRowSelect   =   -1  'True
         _Version        =   393217
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BorderStyle     =   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   4
         BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Text            =   "Tran./Inv. No."
            Object.Width           =   2205
         EndProperty
         BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            SubItemIndex    =   1
            Text            =   "Date"
            Object.Width           =   2117
         EndProperty
         BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            SubItemIndex    =   2
            Text            =   "Gross"
            Object.Width           =   2540
         EndProperty
         BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            SubItemIndex    =   3
            Text            =   "Applied"
            Object.Width           =   2540
         EndProperty
      End
      Begin ITGControls.ComunionFrames ComunionFrames2 
         Height          =   6060
         Left            =   0
         Top             =   795
         Width           =   7470
         _ExtentX        =   13176
         _ExtentY        =   10689
         FrameColor      =   4210752
         BackColor       =   16243138
         FillColor       =   16243138
         RoundedCorner   =   0   'False
         Caption         =   "Check Details"
         Alignment       =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ThemeColor      =   5
         ColorFrom       =   16243138
         ColorTo         =   16250865
         Begin ITGControls.ITGDateBox dtbPulled 
            Height          =   285
            Left            =   5445
            TabIndex        =   15
            TabStop         =   0   'False
            Top             =   2685
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbReplaced 
            Height          =   285
            Left            =   5445
            TabIndex        =   18
            TabStop         =   0   'False
            Top             =   3000
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbBounced 
            Height          =   285
            Left            =   5445
            TabIndex        =   12
            TabStop         =   0   'False
            Top             =   2370
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbDeposited 
            Height          =   285
            Left            =   5445
            TabIndex        =   9
            TabStop         =   0   'False
            Top             =   2055
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbTrans 
            Height          =   285
            Left            =   1650
            TabIndex        =   17
            Top             =   3000
            Width           =   1305
            _ExtentX        =   2302
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGDateBox dtbCheck 
            Height          =   285
            Left            =   1650
            TabIndex        =   2
            Top             =   555
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
            Mandatory       =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkPulled 
            Height          =   300
            Left            =   6765
            TabIndex        =   16
            TabStop         =   0   'False
            Top             =   2685
            Width           =   255
            _ExtentX        =   450
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   ""
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkDeposited 
            Height          =   300
            Left            =   6765
            TabIndex        =   10
            TabStop         =   0   'False
            Top             =   2055
            Width           =   255
            _ExtentX        =   450
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   ""
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkBounced 
            Height          =   300
            Left            =   6765
            TabIndex        =   13
            TabStop         =   0   'False
            Top             =   2370
            Width           =   195
            _ExtentX        =   344
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   ""
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkReplaced 
            Height          =   300
            Left            =   6765
            TabIndex        =   19
            TabStop         =   0   'False
            Top             =   3000
            Width           =   255
            _ExtentX        =   450
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   ""
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGTextBox txtTransType 
            Height          =   285
            Left            =   345
            TabIndex        =   14
            Top             =   2685
            Width           =   2610
            _ExtentX        =   4392
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Trans. Type"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1280
            TextBoxWidth    =   1270
         End
         Begin ITGControls.ITGTextBox txtBankID 
            Height          =   285
            Left            =   345
            TabIndex        =   4
            Top             =   870
            Width           =   2565
            _ExtentX        =   4313
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Bank"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1280
            TextBoxWidth    =   1225
         End
         Begin ITGControls.ITGTextBox txtCode 
            Height          =   285
            Left            =   345
            TabIndex        =   6
            Top             =   1185
            Width           =   2565
            _ExtentX        =   4313
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Customer"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1280
            TextBoxWidth    =   1225
         End
         Begin ITGControls.ITGTextBox txtCheckAmt 
            Height          =   285
            Left            =   3885
            TabIndex        =   3
            Top             =   555
            Width           =   3045
            _ExtentX        =   5159
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   "0"
            DataType        =   1
            DecimalPlace    =   2
            Label           =   "Check Amount"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1540
            TextBoxWidth    =   1445
         End
         Begin ITGControls.ITGTextBox txtRefNo 
            Height          =   285
            Left            =   345
            TabIndex        =   11
            Top             =   2370
            Width           =   2610
            _ExtentX        =   4392
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Reference No."
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1280
            TextBoxWidth    =   1270
         End
         Begin ITGControls.ITGTextBox txtCheckType 
            Height          =   285
            Left            =   345
            TabIndex        =   8
            Top             =   2055
            Width           =   2610
            _ExtentX        =   4392
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Mandatory       =   -1  'True
            Label           =   "Check Type"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1280
            TextBoxWidth    =   1270
         End
         Begin ITGControls.ITGTextBox txtBankName 
            Height          =   285
            Left            =   2925
            TabIndex        =   5
            Top             =   870
            Width           =   4020
            _ExtentX        =   6985
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14737632
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "Street"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   3960
            Enabled         =   0   'False
         End
         Begin ITGControls.ITGTextBox txtName 
            Height          =   285
            Left            =   2925
            TabIndex        =   7
            Top             =   1185
            Width           =   4020
            _ExtentX        =   6985
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            BackColor       =   14737632
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            AllCaps         =   -1  'True
            Label           =   "Street"
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   0
            TextBoxWidth    =   3960
            Enabled         =   0   'False
         End
         Begin ITGControls.ITGTextBox txtRepAmt 
            Height          =   285
            Left            =   3825
            TabIndex        =   20
            TabStop         =   0   'False
            Top             =   3315
            Width           =   3150
            _ExtentX        =   5345
            _ExtentY        =   503
            SendKeysTab     =   -1  'True
            LabelBackColor  =   16243138
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   "0"
            DataType        =   1
            DecimalPlace    =   2
            Label           =   "Replacement Amt."
            BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            LabelWidth      =   1590
            TextBoxWidth    =   1500
         End
         Begin ITGControls.ITGDateBox dtbCleared 
            Height          =   285
            Left            =   5445
            TabIndex        =   21
            TabStop         =   0   'False
            Top             =   3630
            Visible         =   0   'False
            Width           =   1260
            _ExtentX        =   2223
            _ExtentY        =   503
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Text            =   ""
            SendKeysTab     =   -1  'True
         End
         Begin ITGControls.ITGCheckBox chkCleared 
            Height          =   300
            Left            =   6765
            TabIndex        =   22
            TabStop         =   0   'False
            Top             =   3630
            Visible         =   0   'False
            Width           =   255
            _ExtentX        =   450
            _ExtentY        =   529
            BackColor       =   16243138
            Caption         =   ""
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            SendKeysTab     =   -1  'True
         End
         Begin RichTextLib.RichTextBox txtRemarks 
            Height          =   645
            Left            =   1605
            TabIndex        =   23
            Top             =   4455
            Width           =   5385
            _ExtentX        =   9499
            _ExtentY        =   1138
            _Version        =   393217
            ScrollBars      =   3
            MaxLength       =   500
            Appearance      =   0
            TextRTF         =   $"frmMaintChecksOnHand.frx":0000
         End
         Begin VB.Label Label9 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Check Date"
            Height          =   195
            Left            =   360
            TabIndex        =   38
            Top             =   585
            Width           =   825
         End
         Begin VB.Label Label8 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Remarks"
            Height          =   195
            Left            =   405
            TabIndex        =   37
            Top             =   4500
            Width           =   615
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Cleared"
            Height          =   195
            Left            =   3855
            TabIndex        =   36
            Top             =   3675
            Width           =   555
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Replaced"
            Height          =   195
            Left            =   3840
            TabIndex        =   35
            Top             =   3075
            Width           =   660
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Pulled-Out"
            Height          =   195
            Left            =   3840
            TabIndex        =   34
            Top             =   2760
            Width           =   750
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Bounced"
            Height          =   195
            Left            =   3840
            TabIndex        =   33
            Top             =   2430
            Width           =   615
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Deposited"
            Height          =   195
            Left            =   3840
            TabIndex        =   32
            Top             =   2100
            Width           =   720
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Trans. Date"
            Height          =   195
            Left            =   375
            TabIndex        =   31
            Top             =   3045
            Width           =   855
         End
         Begin VB.Line Line3 
            BorderColor     =   &H00404040&
            X1              =   225
            X2              =   7125
            Y1              =   1800
            Y2              =   1800
         End
         Begin VB.Line Line2 
            BorderColor     =   &H00404040&
            X1              =   225
            X2              =   7125
            Y1              =   4275
            Y2              =   4275
         End
         Begin VB.Label lblToWords 
            Alignment       =   2  'Center
            BackStyle       =   0  'Transparent
            Caption         =   "Amount in Words"
            BeginProperty Font 
               Name            =   "Tahoma"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   -1  'True
               Strikethrough   =   0   'False
            EndProperty
            Height          =   570
            Left            =   405
            TabIndex        =   30
            Top             =   5235
            Width           =   6555
         End
      End
   End
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   29
      Top             =   8040
      Width           =   7590
      _ExtentX        =   13388
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   2
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin VB.Label lblDetails 
      BackColor       =   &H00F7D9C2&
      BackStyle       =   0  'Transparent
      Caption         =   "Customer"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   180
      TabIndex        =   27
      Top             =   555
      Visible         =   0   'False
      Width           =   6030
   End
   Begin VB.Label lblHeader 
      BackColor       =   &H00F7D9C2&
      BackStyle       =   0  'Transparent
      Caption         =   "Check Number - Bank ID"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   180
      TabIndex        =   26
      Top             =   195
      Width           =   5715
   End
   Begin VB.Shape Shape1 
      BorderColor     =   &H00404040&
      Height          =   975
      Left            =   0
      Top             =   0
      Width           =   6270
   End
   Begin VB.Image imgLogo 
      BorderStyle     =   1  'Fixed Single
      Height          =   930
      Left            =   6345
      Stretch         =   -1  'True
      Top             =   0
      Width           =   1125
   End
End
Attribute VB_Name = "frmMaintChecksOnHand"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables


'Recordset variables
Private WithEvents rsHeader As ADODB.Recordset
Attribute rsHeader.VB_VarHelpID = -1

'ADO Connection variables

Private connHeader As ADODB.Connection

'Form mode enumeration
Public Enum eChkMode
    Normal
    AddNewEdit
    Find
End Enum
Private Mode As eChkMode

'Other declaration
Private bNewTrans  As Boolean
Private bEditTrans As Boolean
Private bDelTrans As Boolean

Public sBit As String
Private vBM As Variant 'Recordset bookmark variable

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

Private Sub cmdInvoices_Click()
    If Mode <> Normal Then Exit Sub
    
    If cmdInvoices.Caption = "Transactions >>" Then
        sSQL = "SELECT * FROM V_CheckVSInvoice WHERE cCheckNo = '" & Trim(txtCheckNo) & "' AND cBankID = '" & Trim(txtBankID) & "' AND cCompanyID = '" & COID & "'"
        Set rs = New Recordset
        rs.Open sSQL, cn, adOpenForwardOnly, adLockReadOnly
        
        lvwList.ListItems.Clear
        lvwList.Visible = True
        lvwList.Height = 1800
        cmdInvoices.Caption = "<< Transactions"
        
        Do Until rs.EOF
            Set itmX = lvwList.ListItems.Add(, , Trim(rs!cInvNo) & "")
            itmX.SubItems(1) = Format(rs!dDate, "MM/dd/yyyy") & ""
            itmX.SubItems(2) = Format(rs!nGross, "#,##0,#0") & ""
            itmX.SubItems(3) = Format(rs!nAmount, "#,##0,#0") & ""
            
            rs.MoveNext
        Loop
        
        rs.Close
        Set rs = Nothing
    Else
        cmdInvoices.Caption = "Transactions >>"
        lvwList.Visible = False
        lvwList.Height = 255
    End If
    
End Sub

Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
    SortGrid dtgList, ColIndex, rsHeader
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Dim iKey As Integer
    iKey = ToolbarIndex(KeyCode, Shift)
    If iKey <> 0 Then
        If ITGLedgerMain.tbrMain.Buttons(iKey).Enabled = True Then
            ToolbarFunction iKey
        End If
    End If
End Sub

'Set Your Object
Private Sub Form_Load()
        
    Set FrmName = Me
    FormSetup
    
    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'MF03'")
    
    Set rsHeader = New ADODB.Recordset
    
    
    FormLocking True
    FormSearch True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    
    imgLogo.Picture = ITGLedgerMain.Picture1.Picture
    Mode = Find
    txtCheckNo.Locked = False

End Sub

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
    If Mode = AddNewEdit Then
        MsgBox "Unable to close. You are in Add/New/Edit mode." & vbCr & _
            " Must Save or Undo", vbCritical, Me.Caption
        Cancel = True
        Exit Sub
    End If
    
    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False
    
    
    
    
    
    Set rsHeader = Nothing
    Set connHeader = Nothing
    
    Set frmMaintChecksOnHand = Nothing

    lCloseWindow = True
    
'    'oForm(Me.Tag).Mode = 1
'    'oForm(Me.Tag).Tag = Me.Tag
End Sub

'Add new record to the recordset
Public Sub TBNew()
    
    'ADD NEW NOT AVAILABLE IN THIS MODULE

End Sub

'Undo all changes to the recordset
Public Sub TBUndoAll()
On Error GoTo ErrorHandler
    
    Mode = Normal
    
    If rsHeader.Status = adRecNew Then TBUndoCurrent
    
    rsHeader.CancelBatch adAffectAll
    
    UnbindControls
    
    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM
    
    Set FrmName = Me
    FormLocking True
    
    If rsHeader.RecordCount <> 0 Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , lACNew, , , , , , , , True, True, , True
        cmdInvoices.Enabled = True
    Else
        RSZero
        Mode = Find
    End If
    
    sbRS.Panels(2) = ""

    SetDataSource
    SetDataField

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoAll
    End If

End Sub

'Undo changes on the current record
Public Sub TBUndoCurrent()
On Error GoTo ErrorHandler

    If rsHeader.Status = adRecNew Then
        rsHeader.CancelUpdate
    Else
        rsHeader.CancelBatch adAffectCurrent
    End If
   
    If rsHeader.RecordCount = 0 Then RSZero
    
ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoCurrent
    End If

End Sub

'Save all changes
Public Sub TBSave()
Dim OKUpdate As Boolean
On Error GoTo ErrHandler

    'Audit Trail
    lBoolean = False
    If rsHeader.Status = adRecNew Then lBoolean = True
    
    If rsHeader.Status = adRecNew Then

    End If
    
    
    OKUpdate = False
    cn.BeginTrans
    connHeader.BeginTrans
    
    rsHeader.UpdateBatch adAffectAll
    
    cn.CommitTrans
    connHeader.CommitTrans
    OKUpdate = True
    
    Set FrmName = Me
    FormLocking True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , lACEdit, , , , , , , , True, True, , True
    Mode = Normal
    cmdInvoices.Enabled = True

    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"
        
    'Audit trail
    UpdateLogFile "Checks On Hand", Trim(txtCheckNo) & ", " & Trim(txtBankID), IIf(lBoolean, "Inserted", "Updated")
    
    lblHeader = rsHeader!cCheckNo & " - " & rsHeader!cBankID & ""
    lblDetails = rsHeader!cName
    sbRS.Panels(2) = ""

ErrHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217864 Then
        OKUpdate = True
        cn.RollbackTrans
        connHeader.RollbackTrans
        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
        vBookMark = rsHeader.Bookmark
        UnbindControls
        rsHeader.Requery
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , lACEdit, , , , , , , , True, True, , True
        Mode = Normal
        If rsHeader.RecordCount <> 0 Then
            Set FrmName = Me
            FormLocking True
            SetDataField
            SetDataSource
            rsHeader.Bookmark = vBookMark
        Else
            RSZero
        End If
        cmdInvoices.Enabled = True
    End If
    If Not OKUpdate Then
        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
        cn.RollbackTrans
        connHeader.RollbackTrans
        ErrorLog err.Number, err.Description, Me.Name 'Error log
    End If
    
End Sub

'Sets the form & recorset to add/edit mode
Public Sub TBEdit()
    Mode = AddNewEdit
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , True, True, , , , True
    txtRemarks.Locked = False
    txtRemarks.SetFocus
    cmdInvoices.Enabled = False
    Set FrmName = Me
    SSTab1.ActiveTab = 0
    txtRemarks.SetFocus
    vBM = rsHeader.Bookmark
End Sub

'Delete record
Public Sub TBDelete()
On Error GoTo ErrorHandler
    
    'NOT AVAILABLE IN THIS MODULE

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If

End Sub

'Search using the frmITGSearch
Public Sub TBFind()
    Mode = Normal
    txtCheckNo.Locked = True
    frmITGSearch.Show
End Sub

'Search using the recordset primary key
Public Sub TBFindPrimary()
Dim sTemp As String
If Mode = Find Then
    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
            
    OpenNewConnection connHeader
    
    Set rsHeader = Nothing
    Set rsHeader = New ADODB.Recordset
            
    sTemp = Trim$(GetSearchString)
    If sTemp = "ERROR" Then
        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
        txtCheckNo.Locked = False
        txtCheckNo.SetFocus
        Exit Sub
    End If
    
    OpenRecordsetWithCN rsHeader, "*", "CHECKS", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
               
    Set FrmName = Me
    FormLocking True
            
    If rsHeader.RecordCount = 0 Then
        FormWaitHide
        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
        RSZero
        FormSearch True
        SearchObj True
        Mode = Find
        Exit Sub
    End If
    SetDataSource
    SetDataField
    cmdInvoices.Enabled = True
    txtCheckNo.BackColor = &HE0FFFF
    Mode = Normal
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , True, True, , True

    FormWaitHide
Else
    RSZero
    FormSearch True
    SearchObj True
    Mode = Find
   
End If

End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

'Move first
Public Sub TBFirstRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveFirst rsHeader

End Sub

'Move previous
Public Sub TBPrevRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MovePrevious rsHeader

End Sub

'Move next
Public Sub TBNextRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveNext rsHeader

End Sub

'Move last
Public Sub TBLastRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveLast rsHeader

End Sub

'Add new line to the detail recordset
Public Sub TBNewLine()
    'Not available for this module
End Sub

'Delete line in the detail recordset
Public Sub TBDeleteLine()
    'Not avilable for this module
End Sub

'Undo all
Public Sub TBUndoLineAll()
    'Not available for this module
End Sub

'Undo current line
Public Sub TBUndoLineCurrent()
    'Not available for this module
End Sub

'Post current record
Public Sub TBPostRecord()
    'Not available for this module
End Sub

'Cancel current record
Public Sub TBCancelRecord()
    'Not available for this module
End Sub

'Print
Public Sub TBPrintRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Sets the data source of the controls
Sub SetDataSource()
    Set FrmName = Me
    BindControls rsHeader
    Set dtgList.DataSource = rsHeader
   
End Sub
    
'Sets the data field for every bounded controls
Sub SetDataField()
    With rsHeader
        txtCheckNo.DataField = !cCheckNo
        dtbCheck.DataField = !dCheckDate
        txtBankID.DataField = !cBankID
        txtCode.DataField = !cCode
        txtName.DataField = !cName
        txtCheckAmt.DataField = !nAmount
        txtCheckType.DataField = !cType
        txtRefNo.DataField = !cTranNo
        txtTransType.DataField = !cTransType
        dtbTrans.DataField = !dTransDate
        dtbDeposited.DataField = !dDeposited
        dtbBounced.DataField = !dBounced
        dtbReplaced.DataField = !dReplaced
        dtbPulled.DataField = !dPulled
        dtbCleared.DataField = !dCleared
        chkDeposited.DataField = !lDeposited
        chkBounced.DataField = !lBounced
        chkReplaced.DataField = !lReplaced
        chkPulled.DataField = !lPulled
        chkCleared.DataField = !lCleared
        txtRepAmt.DataField = !nRepAmount
        txtRemarks.DataField = "cRemarks"
    End With
End Sub

Private Sub rsHeader_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
On Error GoTo ErrorHandler
    
    If Not (rsHeader.EOF) Or Not (rsHeader.BOF) Then
        lblHeader = rsHeader!cCheckNo & " - " & rsHeader!cBankID & ""
        lblDetails = rsHeader!cName & ""
        sbRS.Panels(1) = "Record: " & IIf((rsHeader.AbsolutePosition = -2), "0", rsHeader.AbsolutePosition) & "/" & rsHeader.RecordCount
        
        lblToWords = NumToWords(rsHeader!nAmount, "Pesos")
        
        If rsHeader.Status <> adRecNew Then
            txtCheckNo.Locked = True
        Else
            txtCheckNo.Locked = False
        End If
        
        If Mode = AddNewEdit Then
            Select Case rsHeader.Status
                Case adRecNew
                    sbRS.Panels(2) = "New"
                Case adRecModified
                    sbRS.Panels(2) = "Modified"
                Case Else
                    sbRS.Panels(2) = ""
            End Select
        Else
            sbRS.Panels(2) = ""
        End If
    Else
        lblHeader = "Check Number - Bank ID"
        lblDetails = "Customer"
        sbRS.Panels(1) = "Record: 0/0"
        sbRS.Panels(2) = ""
        txtCheckNo.Locked = False
    End If
    
ErrorHandler:
    'Err.Number -2147217885
    'Description - Row handle referred to a deleted row or a row marked for deletion.
    If err.Number = -2147217885 Then
        Resume Next
    End If
    
End Sub

Private Sub Timer1_Timer()
    If Mode = AddNewEdit Then
        SSTab1.TabEnabled(1) = False
    Else
        SSTab1.TabEnabled(1) = True
    End If
End Sub

Private Sub txtBankID_Change()
    txtBankName = ""
    txtBankName = GetValueFrTable("cBankName", "BANK", "cBankID = '" & Trim(txtBankID) & "'")
End Sub

Private Sub txtCode_Change()
    If Mode <> AddNewEdit Then Exit Sub
    txtName = ""
    txtName = GetValueFrTable("cName", "CLIENT_CUSTOMER", "cCode = '" & Trim(txtCode) & "'")
End Sub

Private Sub txtCheckNo_LostFocus()
    'NOT AVAILABLE FOR THIS MODULE
End Sub

Private Function GetSearchString() As String
On Error GoTo ErrorHandler
Dim sWhere As String

    GetSearchString = True

    If Trim$(txtCheckNo.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCheckNo LIKE '" & Trim$(txtCheckNo.Text) & "%'"
    End If

    If Trim$(dtbCheck.Text) <> "__/__/____" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " dCheckDate = '" & Trim$(dtbCheck.Text) & "'"
    End If
    
    If Trim$(txtBankID.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cBankID LIKE '" & Trim$(txtBankID.Text) & "%'"
    End If
    
    If Trim$(txtCode.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cCode LIKE '" & Trim$(txtCode.Text) & "%'"
    End If
    
    If Trim$(txtCheckType.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cType LIKE '" & Trim$(txtCheckType.Text) & "%'"
    End If
    
    If Trim$(txtRefNo.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cTranNo LIKE '" & Trim$(txtRefNo.Text) & "%'"
    End If
    
    If Trim(txtTransType.Text) <> "" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cTransType LIKE '" & Trim$(txtTransType.Text) & "%'"
    End If
    
    If Trim(dtbTrans.Text) <> "__/__/____" Then
        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " dTransDate = '" & Trim$(dtbTrans.Text) & "'"
    End If
    
    GetSearchString = Trim$(sWhere)

    Exit Function
ErrorHandler:
    GetSearchString = "ERROR"
End Function

'Check if all mandatory fields are complete
Function MandatoryOK() As Boolean
    'NOT AVAILABLE FOR THIS MODULE
End Function

'Sets the form if record number is zero
Private Sub RSZero()
    lblHeader = "Check Number - Bank ID"
    lblDetails = "Customer"
    sbRS.Panels(1) = "Record: 0/0"
    sbRS.Panels(2) = ""
    
    Set FrmName = Me
    UnbindControls
    TextClearing
    FormLocking True
    
    If rsHeader.State = adStateOpen Then rsHeader.Close
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True, , , True
    
    txtCheckNo.Locked = False
    txtCheckNo.SetFocus
    
    Mode = Find
End Sub

Sub SearchObj(lEnable As Boolean)
    dtbCheck.Enabled = lEnable
    dtbTrans.Enabled = lEnable
End Sub

Private Sub txtRemarks_KeyPress(KeyAscii As Integer)
    If Mode <> AddNewEdit Then Exit Sub
    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

'Public Sub ShowForm(sTranNo As String)
'    If Mode = Find Then
'
'        OpenNewConnection connHeader
'
'        Set rsHeader = Nothing
'        Set rsHeader = New ADODB.Recordset
'
'        OpenRecordsetWithCN rsHeader, "*", "CHECKS", connHeader, "WHERE cCheckNo = '" & Trim(sTranNo) & "'"
'
'        Set FrmName = Me
'        FormLocking True
'
'        If rsHeader.RecordCount = 0 Then
'            FormWaitHide
'            MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
'            rsHeader.Close
'            oBar.BitEnabled Me, ITGLedgerMain.tbrMain, , , , , , , , , , True, , , True
'            txtCheckNo.Locked = False
'            txtCheckNo.SetFocus
'            Exit Sub
'        End If
'
'        SetDataSource
'        SetDataField
'
'        txtCheckNo.BackColor = &HE0FFFF
'        Mode = Normal
'        cmdInvoices.Enabled = True
'
'        oBar.BitEnabled Me, ITGLedgerMain.tbrMain, , lACEdit, , , , , , , , True, True, , True
'
'    End If
'End Sub


